package com.grf.sm4;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @apiNote 测试
 * @author grf
 * @since 2024/9/1
 */
@Slf4j
@RestController
@RequestMapping("/test")
@RequiredArgsConstructor
public class TestController {
    private final JdbcTemplate jdbcTemplate;

    @GetMapping("tbAccount")
    public List<Map<String, Object>> getData(){
        var sql = """
                select * from tb_account
                """;
        return jdbcTemplate.queryForList(sql);
    }
}
